<?php
	
	use Workerman\Worker;
	use Workerman\Mysql;
	use Workerman\Lib\Timer;
	use Workerman\Protocols\Http;


	/*$g_logger_server = new Log4\Server(1);
	$g_logger_server->onLogger(function($data){
		var_dump( $data );
	});
	
	$wk = new Worker();
	$wk->count = 1;
	$wk->onWorkerStart = function($worker){
        // 新建一个线程，访问logger 的 6206端口
		Log4\Logger::connect();
		Log4\Logger::ALERT("CLA", "DEV", "ER", "FAT" );
		Log4\Logger::onError(function($msg){
			var_dump($msg);
		});
		
		// Timer::add(2, function(){
			// Log4\Logger::ALERT("CLA", "FORMAT001", 4008, "FAT" );
		// });		
	};*/
	
	
	// 如果不是在根目录启动，则运行runAll方法
	if(!defined('GLOBAL_START')){
		Worker::runAll();
	}


	
?>
